<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>Title</title>
</head>
<link href="../static/css/bootstrap.min.css" rel="stylesheet"/>
<link href="../static/css/bootstrap-combined.min.css" rel="stylesheet"/>
<script src="../static/js/jquery-3.2.0.min.js"></script>
<script src="../static/js/bootstrapValidator.js"></script>
<script src="../static/js/bootstrap.min.js"></script>
<script src="../static/js/AjaxModel.js"></script>


<body>
<div th:include="header::header"></div>

<div class="container">
    <div class="row">
        <div class="span12">
            <div class="row">
                <div class="span3">
                </div>
                <div class="span5">
                    <fieldset>
                        <legend>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;个人信息</legend>
                    <form class="form-horizontal" action="/uic/detail_post" method="post" id="detail">
                        <div class="control-group">
                            <label class="control-label" for="inputEmail" >邮箱</label>
                            <div class="controls">
                                <input id="inputEmail" th:value=${content.email} name="email" checked="checked" type="email" required="required"/>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">年龄</label>
                            <div class="controls">
                                <input type="number" th:value=${content.age} name="age" checked="checked" required="required" max="100"/>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">性别</label>
                            <div class="controls">
                                <select id="gender" name="gender" th:value=${content.gender}>
                                    <option value="2" selected="selected">女</option>
                                    <option value="1">男</option>
                                </select>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">地址</label>
                            <div class="controls">
                                <select id ="address" name="address" value=${content.address} >
                                    <option value="1">北京市</option>
                                    <option value="2">上海市</option>
                                    <option value="3">天津市</option>
                                    <option value="4">重庆市</option>
                                    <option value="5">黑龙江省</option>
                                    <option value="6">吉林省</option>
                                    <option value="7">辽宁省</option>
                                    <option value="8">内蒙古</option>
                                    <option value="9">河北省</option>
                                    <option value="10">新疆</option>
                                    <option value="11">甘肃省</option>
                                    <option value="12">青海省</option>
                                    <option value="13">陕西省</option>
                                    <option value="14">宁夏</option>
                                    <option value="15">河南省</option>
                                    <option value="16">山东省</option>
                                    <option value="17">山西省</option>
                                    <option value="18">安徽省</option>
                                    <option value="19">湖北省</option>
                                    <option value="20">江苏省</option>
                                    <option value="21">四川省</option>
                                    <option value="22">贵州省</option>
                                    <option value="23">云南省</option>
                                    <option value="24">广西省</option>
                                    <option value="25">西藏</option>
                                    <option value="26">浙江省</option>
                                    <option value="27">江西省</option>
                                    <option value="28">广东省</option>
                                    <option value="29">福建省</option>
                                    <option value="30">台湾省</option>
                                    <option value="31">海南省</option>
                                    <option value="32">香港</option>
                                    <option value="33">澳门</option>
                                    <option value="34">湖南省</option>

                                </select>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">昵称</label>
                            <div class="controls">
                                <input type="text" name="nickname" th:value=${content.nickname} checked="checked" required="required" />
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">身份证</label>
                            <div class="controls">
                                <input type="text" name="identification" identification th:value=${content.identification} checked="checked" minlength="18" maxlength="18" />
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">职业</label>
                            <div class="controls">
                                <input type="text" name="occupation" checked="checked" th:value=${content.occupation} required="required"/>
                            </div>
                        </div>
                        <div class="controls">
                            <button type="submit" class="btn">确认修改</button><b th:text=${errorMessage}></b>
                        </div>
                      </form>
                    </fieldset>
                </div>
                <div class="span4">
                    <br>
                    <br>
                    <br>
                    <h3><a href="/car_option/sale_applie_list">查看个人卖车申请</a></h3>
                    <h3><a href="/uic/zhuxiao">注销登陆</a></h3>
                    <h3><a href="/car_option/transac">查看交易信息</a></h3>
                    <h3><a href="/uic/password_change">修改密码</a></h3>
                </div>
            </div>
        </div>
    </div>
</div>

<script th:inline="javascript">

    $(function () {

        /*<![CDATA[*/

        var s=[[${content.address}]];
        $("#address option").each(function(){ //遍历全部option
            var txt = $(this).val(); //获取option的内容
            if(txt==s){
                this.selected=true;
            }
        });
        var gender=[[${content.gender}]];
        $("#gender option").each(function(){ //遍历全部option
            var txt = $(this).val(); //获取option的内容
            if(txt==gender){
                this.selected=true;
            }
        });
        /*]]>*/
    })
</script>
</body>
</html>